home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / FRITZ1.DXR / 00254_thrower.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  1.9 KB  |  50 lines

  1. on thrower mysprt, mymnv
  2.   global mnv
  3.   if (the memberNum of sprite mysprt = 221) and (random(3) = 1) then
  4.     setAt(mnv, mymnv, 6)
  5.     set the memberNum of sprite mysprt to 225
  6.     set the memberNum of sprite (mysprt + 2) to the number of member ("cheese" & mysprt - 14)
  7.   end if
  8. end
  9.  
  10. on throweron mysprt, mymnv
  11.   global mnv, cheese, ppl, fxpath, pwr
  12.   if getAt(mnv, mymnv) > 1 then
  13.     set the memberNum of sprite mysprt to the memberNum of sprite mysprt + 1
  14.     setAt(mnv, mymnv, getAt(mnv, mymnv) - 1)
  15.     if getAt(mnv, mymnv) = 4 then
  16.       put 2 + random(4) into item mysprt - 12 of cheese
  17.       put 12 into item mysprt - 14 of cheese
  18.       if sprite(mysprt).flipH = 1 then
  19.         set the locH of sprite (mysprt + 2) to the locH of sprite mysprt + 40
  20.       else
  21.         set the locH of sprite (mysprt + 2) to the locH of sprite mysprt - 40
  22.       end if
  23.     else
  24.       if getAt(mnv, mymnv) = 1 then
  25.         set the memberNum of sprite mysprt to 221
  26.         setAt(mnv, mymnv, 0)
  27.       end if
  28.     end if
  29.   end if
  30.   if value(item mysprt - 14 of cheese) > 1 then
  31.     put value(item mysprt - 14 of cheese) - 1 into item mysprt - 14 of cheese
  32.     if sprite(mysprt).flipH = 1 then
  33.       set the locH of sprite (mysprt + 2) to the locH of sprite (mysprt + 2) + (7 * value(item mysprt - 12 of cheese))
  34.     else
  35.       set the locH of sprite (mysprt + 2) to the locH of sprite (mysprt + 2) - (5 * value(item mysprt - 12 of cheese))
  36.     end if
  37.     if (value(item mysprt - 14 of cheese) < 8) and sprite getAt(ppl, 1) intersects (mysprt + 2) and (the memberNum of sprite getAt(ppl, 1) < 37) and not soundBusy(3) then
  38.       sound playFile 3, fxpath & "splat.aif"
  39.       sound playFile 1, fxpath & random(3) + 292
  40.       setAt(pwr, 1, getAt(pwr, 1) - 10)
  41.     end if
  42.   else
  43.     if value(item mysprt - 14 of cheese) = 1 then
  44.       put 0 into item mysprt - 14 of cheese
  45.       set the locH of sprite (mysprt + 2) to 1000
  46.       set the member of sprite (mysprt + 2) to 257
  47.     end if
  48.   end if
  49. end
  50.